<?php

/*

Autore: Urza
Email: sbozzolator@gmail.com	
Data: 3/10/09
Versione: 1.0 (Non-Release)
Nome: DBFuncions.php

*/

	function DoQuery ($Query, $TableName) {
	
					global $Prefix;
					$Table  = $Prefix.$TableName;
					$DoQry  = str_replace("{{table}}", $Table, $Query);
					$Return = mysql_query($DoQry) or die("MySQL Error: <b>".mysql_error()."</b>");
				return $Return;
				}
				
	function SelectDb ($dbSettings) {
	
					$db = mysql_connect($dbSettings['server'], $dbSettings['user'], $dbSettings['pass']);
					if ($db == FALSE) die ("MySql Connecct Error!");
					mysql_select_db($dbSettings['name'], $db) or die ("MySql Selection Error!");
				return "";
				}